
-#%form.form-inline{action:"#{search_violation_path}"}
= form_tag search_violation_path, remote: true, method: :get, class: 'form-inline',style: 'text-align:center;margin-top:20px;' do
  .form-group
    .input-group
      .input-group-addon
        %span.glyphicon.glyphicon-search{"aria-hidden" => "true"}
      %input.form-control{:name => "car[plate_number]", :placeholder => "车牌号", :type => "text", :value => ""}/
  .form-group
    %input.form-control{:name => "car[frame_number]", :placeholder => "车架号", :type => "text", :value => ""}/
  %button.btn.btn-primary{:type => "submit"} 查询


#search-result

%p#notice= notice
%h1 所有信息
%table.table.table-bordered
  %thead
    %tr
      %th 车牌号
      %th 车架号
      %th 违章时间
      %th 违章地点
      %th 违章内容
      %th 违章代码
      %th 违章扣分
      %th 罚款金额
      %th 是否处理
      %th
  %tbody
    - @traffic_violations.each do |traffic_violation|
      %tr
        %td= traffic_violation.plate_number
        %td= traffic_violation.frame_number
        %td= traffic_violation.voilated_at.strftime("%Y-%m-%d %H:%M:%S")
        %td= traffic_violation.location
        %td= traffic_violation.action
        %td= traffic_violation.code
        %td= traffic_violation.deduction
        %td= traffic_violation.fine_amount
        %td= traffic_violation.handled ? '是' : '否'
        %td= link_to '显示', traffic_violation
        -#
          %td= link_to 'Edit', edit_traffic_violation_path(traffic_violation)
          %td= link_to 'Destroy', traffic_violation, method: :delete, data: { confirm: 'Are you sure?' }
%br
= paginate @traffic_violations
-#= link_to 'New Traffic violation', new_traffic_violation_path
